<!--
 * @Author: 叫我龟先生 yyxxkahhh@163.com
 * @Date: 2022-09-22 19:53:26
 * @LastEditors: 叫我龟先生 yyxxkahhh@163.com
 * @LastEditTime: 2022-09-22 20:35:15
 * @FilePath: \my_vue_03\src\作业2.卖狗.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <Dog2
    v-for="(item,index) in arr"
    :key="index"
    :dogImgUrl='item.dogImgUrl'
    :dogName='item.dogName'
    ></Dog2>
    

  </div>
</template>

<script>
//给狗的链接设置数组，v-for遍历出来，引入component文件
//遍历图片和名字的时候用自定义的变量
import Dog2 from './components/Dog2.vue'
export default {
components:{
    Dog2
},
data() {
    return {
      // 1. 准备数据
      arr: [
        {
          dogImgUrl:
            "https://t7.baidu.com/it/u=938651884,1522785317&fm=193&f=GIF",
          dogName: "博美，已绝育",
        },
        {
          dogImgUrl:
            "https://t7.baidu.com/it/u=1797095996,3240592019&fm=193&f=GIF",
          dogName: "泰迪，低价出",
        },
        {
          dogImgUrl:
            "https://t7.baidu.com/it/u=1951548898,3927145&fm=193&f=GIF",
          dogName: "金毛，超可爱",
        },
        {
          dogImgUrl:
            "https://t7.baidu.com/it/u=3332251293,4211134448&fm=193&f=GIF",
          dogName: "哈士奇，好养活",
        },
        {
          dogImgUrl:
            "https://t7.baidu.com/it/u=848096684,3883475370&fm=193&f=GIF",
          dogName: "阿拉斯加，不拆家",
        },
        {
          dogImgUrl:
            "https://t7.baidu.com/it/u=1517419723,1472324058&fm=193&f=GIF",
          dogName: "萨摩耶，很听话",
        },
      ],
    };
  },
}
</script>

<style>

</style>